<template>
  <Layout>
    <div class="container">
      <div class="journal-hero">
        <h1 class="journal-header">
          a wise person once said...
        </h1>
      </div>
    </div>
    <template v-for="j in $page.journals.edges">
      <g-link :to="`/journals/${j.node.id}`" class="journal-post">
        <div class="container journal">
          <h2 class="journal-title">{{ j.node.title }}</h2>
          <p class="journal-excerpt">{{ j.node.excerpt }}</p>
        </div>
      </g-link>
    </template>
  </Layout>
</template>
<page-query>
query {
  journals: allStrapiJournals {
    edges {
      node {
        id
        title
        content
        excerpt
      }
    }
  }
}
</page-query>
<script>
export default {
  name: 'journalPage',
  metaInfo: {
    title: "Journal"
  }
};
</script>

<style>
</style>